package com.dimples.dd.gateway.route.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2024/9/13
 */
@Data
@Configuration
@RefreshScope
public class GatewayRoutersConfig {

    /**
     * 路由配置方式：database，yml，nacos
     */
    @Value("${dd.route.config.data-type:yml}")
    public String dataType;

    @Value("${dd.route.config.data-id:#{null}}")
    public String dataId;

    @Value("${spring.cloud.nacos.discovery.server-addr}")
    public String serverAddr;

    @Value("${spring.cloud.nacos.config.namespace:#{null}}")
    public String namespace;

    @Value("${spring.cloud.nacos.config.group:DEFAULT_GROUP:#{null}}")
    public String routeGroup;

    @Value("${spring.cloud.nacos.config.username:#{null}}")
    public String username;

    @Value("${spring.cloud.nacos.config.password:#{null}}")
    public String password;

}
